Archivos:
linkoff.gif linkon.gif
En unos pocos segundos esta imagen cambiará de color.
Para usar este script, copia el siguiente código en <head></head>
tag.
Necesitarás cambiar la localización de tus imágenes en "YOUR FIRST RELOADED IMAGE"
y "YOUR FIRST ORIGINAL IMAGE"
<script language="JavaScript"> function startTime(){ var time= new Date(); hours= time.getHours(); mins= time.getMinutes(); secs= time.getSeconds(); closeTime=hours*3600+mins*60+secs; closeTime+=3; // If you want it to wait loading longer or shorter adjust this number accordingly. Timer(); } function Timer(){ var time= new Date(); hours= time.getHours(); mins= time.getMinutes(); secs= time.getSeconds(); curTime=hours*3600+mins*60+secs if(curTime>=closeTime) reloadimg(); else window.setTimeout("Timer()",1000) } function reloadimg(){ document.img1.src = "YOUR FIRST RELOADED IMAGE" } </script>
<img src="YOUR FIRST ORIGINAL IMAGE" name="img1">
document.img2.src = "YOUR SECOND RELOADED IMAGE"Tu script tendrá esta apariencia.
<script language="JavaScript"> function startTime(){ var time= new Date(); hours= time.getHours(); mins= time.getMinutes(); secs= time.getSeconds(); closeTime=hours*3600+mins*60+secs; closeTime+=3; // If you want it to wait loading longer or shorter adjust this number accordingly. Timer(); } function Timer(){ var time= new Date(); hours= time.getHours(); mins= time.getMinutes(); secs= time.getSeconds(); curTime=hours*3600+mins*60+secs if(curTime>=closeTime) reloadimg(); else window.setTimeout("Timer()",1000) } function reloadimg(){ document.img1.src = "YOUR FIRST RELOADED IMAGE" document.img2.src = "YOUR SECOND RELOADED IMAGE" } </script>
<img src="YOUR SECOND ORIGIONAL IMAGE" name="img2">